from django.db import models

# Create your models here.

class Product(models.Model):
    name = models.TextField()
    description = models.TextField()
    active = models.BooleanField()
    
    def __str__(self):
        return self.name

    class Admin:
        pass

class Image(models.Model):
    listing_image = models.ImageField(upload_to='/tmp')
    item_image = models.ImageField(upload_to='/tmp')

    def __str__(self):
        return 'Hello'

    class Admin:
        pass    

class Item(models.Model):
    ref = models.TextField()
    active = models.BooleanField()
    product = models.ForeignKey(Product)
    image = models.ForeignKey(Image)

    def __str__(self):
        return self.ref

    class Admin:
        pass


